home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / sys / amiga / programmer / 264 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.8 KB

  1. Path: nntp.teleport.com!sschaem
  2. From: sschaem@teleport.com (Stephan Schaem)
  3. Newsgroups: comp.sys.amiga.programmer
  4. Subject: Re: PPC compilers
  5. Date: 5 Jan 1996 16:00:48 GMT
  6. Organization: Teleport - Portland's Public Access (503) 220-1016
  7. Message-ID: <4cjhvg$4im@maureen.teleport.com>
  8. References: <john.hendrikx.40ka@grafix.xs4all.nl> <4b77tq$htp@serpens.rhein.de> <MQAQx*XOe@yaps.rhein.de> <4bqhnf$6g5@sunsystem5.informatik.tu-muenchen.de> <jasonb.820051107@cs.uwa.edu.au> <4c9i2l$h3i@sunsystem5.informatik.tu-muenchen.de> <Kevin_Phair.040
  9. NNTP-Posting-Host: kelly.teleport.com
  10. X-Newsreader: TIN [version 1.2 PL2]
  11.  
  12. Organization: Teleport - Portland's Public Access (503) 220-1016
  13. Distribution: 
  14.  
  15. Kevin Phair (Kevin_Phair@bgi.internet-eireann.ie) wrote:
  16. : fischerj@Informatik.TU-Muenchen.DE (Juergen "Rally" Fischer) writes:
  17.  
  18. : > : But you can't say whether move.w (a0)+,(a1)+ is what you want without
  19. : > : knowing what a0 and a1 are pointing to any more than you can with C.
  20. : > 
  21. : > yes, but in the C example you even don't know if it's .w, TAIC.
  22.  
  23. : So when you declare your C variables, why don't you append _w, _c, _l
  24. : depending on what type they are? But surely since you can give your
  25. : variables meaningful name, you should be able to tell what type they
  26. : are anyway?
  27.  
  28.  Marking a variable with type extension is done in assembly too. ex:
  29.  
  30.  move.w    (TASK_MyVariable_W, a4),([TASK_MyTable_PW,a4],d0.w*W_SIZEOF)
  31.  
  32.  (This is too compensate for the lack of type checking by the assembler)
  33.  
  34.  in C:
  35.  
  36.  TASK->MyTable[offset] = TASK->MyVariable;
  37.  
  38.  The (a0)+,(a1)+ example is 'bogus' because who knows what a0 and a1 point
  39.  too? a0 could be a pointer to a string for all you know looking at
  40.  that single instruction... You know what the inst is doing, but you
  41.  dont know what the instruction is about.
  42.  
  43.  Stephan
  44.